<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card">

    <div class="layui-card-body padding-left-40">

        <fieldset class="layui-bg-gray">
            <legend><span class="layui-badge think-bg-violet">公证书</span></legend>
            <div>
                <label class="layui-form-item block relative">
                    <span class="color-green font-w7 label-required-prev">公证处</span>
                    <span class="color-desc margin-left-5"></span>
                    <select class="layui-select" lay-search name="notarial_office_id" id="notarial_office_id" lay-filter="notarial_office_id" readonly>
                        {foreach $Offices as $cate}
                        {if $cate.id == $matter.notarial_office_id}
                            <option  value="{$cate.id}" selected>{$cate.name|default=''}</option>
                        {else}
                            <option  value="{$cate.id}">{$cate.name|default=''}</option>
                        {/if}
                        {/foreach}
                    </select>
                </label>
                <label class="layui-form-item block relative">
                    <span class="color-green font-w7 label-required-prev">公证事项</span>
                    <span class="color-desc margin-left-5"></span>
                    <select class='layui-select' name='base_type' lay-search lay-filter="matter" id="matter" readonly>
                        {foreach ['委托公证','声明书公证','亲属关系公证'] as $k=>$v}
                        {if isset($vo.base_type) && $vo.base_type eq $k}
                        <option selected value='{$k}'>{$v}</option>
                        {else}
                        <option value='{$k}'>{$v}</option>
                        {/if}{/foreach}
                    </select>
                </label>

                <label class="layui-form-item  relative type_label">
                    <span class="color-green font-w7 label-required-prev">公证类型</span>
                    <span class="color-desc margin-left-5"></span>
                    <select class='layui-select' name='matter_id' lay-search id="matter_id" lay-filter="matter_id" readonly>
                        {if $vo.base_type != 0}
                            {foreach ['本人办理','代理人办理'] as $k=>$v}
                                {if $vo.matter_id == 1 && $k==0}
                                <option  value="{$v.id|default=0}" selected>{$v.name|default=''}</option>
                                {else}
                                <option  value="{$v.id|default=0}">{$v.name|default=''}</option>
                                {/if}
                            {/foreach}
                        {else}

                        {/if}


                    </select>
                </label>

                <label class="layui-form-item block relative">
                    <span class="color-green font-w7 label-required-prev">公证书份数</span>
                    <span class="color-desc margin-left-5"></span>
                    <input class="layui-input" type="number" min="1" data-blur-number="0" name="number_goods" placeholder="请输入商品限购数量" value="{$vo.number_goods|default=1}">
                </label>

            </div>
        </fieldset>

        <fieldset class="layui-bg-gray">
            <legend><span class="layui-badge think-bg-violet">{if $vo.matter_id == '1' and $vo.base_type != '0'}委托人信息{else}代理人+委托人信息{/if}</span></legend>
            <div>
                <label class="layui-form-item block relative">
                    <span class="color-green font-w7 label-required-prev client_or_agents_name">姓名</span>
                    <span class="color-desc margin-left-5"></span>
                    <input class="layui-input" name="client_name" required value='{$vo.client_name|default=""}' >
                </label>

                <label class="layui-form-item block relative">
                    <span class="color-green font-w7 label-required-prev client_or_agents_phone">联系电话</span>
                    <span class="color-desc margin-left-5"></span>
                    <input class="layui-input" name="client_phone" required value='{$vo.client_phone|default=""}' >
                </label>

                <div class="agents_msg" style="display: none;">
                    <span class="help-label label-required-prev"><b>代理人身份证</b></span>
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th class="nowrap text-center">身份证正面</th>
                            <th class="nowrap text-center">身份证反面</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:10px 0;">
                                    <input name="front_of_agents_id_card" type="hidden" value="{$vo.front_of_agents_id_card|default=''}">
                                    <script>$('[name="front_of_agents_id_card"]').uploadOneImage();</script>
                                </div>
                            </td>
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:5px;">
                                    <input name="reverse_side_of_agents_id_card" type="hidden" value="{$vo.reverse_side_of_agents_id_card|default=''}">
                                    <script>$('[name="reverse_side_of_agents_id_card"]').uploadOneImage();</script>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div>
                    <span class="help-label label-required-prev"><b>委托人身份证</b></span>
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th class="nowrap text-center">身份证正面</th>
                            <th class="nowrap text-center">身份证反面</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:10px 0;">
                                    <input name="client_front_of_id_card" type="hidden" value="{$vo.client_front_of_id_card|default=''}">
                                    <script>$('[name="client_front_of_id_card"]').uploadOneImage();</script>
                                </div>
                            </td>
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:5px;">
                                    <input name="client_reverse_side_of_id_card" type="hidden" value="{$vo.client_reverse_side_of_id_card|default=''}">
                                    <script>$('[name="client_reverse_side_of_id_card"]').uploadOneImage();</script>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>


                <span class="help-label"><b>委托人户口本图片</b></span>
                <fieldset class="layui-form-item">
                    <div class="help-images text-center">
                        <div style="">
                            <input name="client_household_register" type="hidden" value="{$vo.client_household_register|default=''}">
                            <script>$('[name="client_household_register"]').uploadMultipleImage();</script>
                        </div>
                    </div>
                </fieldset>

                <!--亲属关系公证才会显示-->
                <div id="proof_of_relationship">
                    <span class="help-label"><b>关系证明图片</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images text-center">
                            <div style="">
                                <input name="proof_of_relationship" type="hidden" value="{$vo.proof_of_relationship|default=''}">
                                <script>$('[name="proof_of_relationship"]').uploadMultipleImage();</script>
                            </div>
                        </div>
                    </fieldset>
                </div>

            </div>
        </fieldset>

        <fieldset class="layui-bg-gray">
            <legend><span class="layui-badge think-bg-violet">{in name='$vo.base_type' value='1,2'}父母婚姻状况{else/}婚姻状况{/in}</span></legend>
            <div>
                <div class="layui-form-item">
                    <!--<span class="color-green font-w7 label-required-prev">婚姻状况</span>-->
                    <span class="color-desc margin-left-5"></span>
                    {foreach ['未婚','已婚','离异'] as $k => $v}
                    <!--0未婚,1已婚,2离异-->
                    <input name="client_marital_status" title="{$v}" type="radio" value="{$k}"  lay-filter="client_marital_status" {$vo.client_marital_status==$k ? 'checked':''}>
                    {/foreach}


                </div>

                <div class="div_marriage_certificate" style="display: none;">
                    <span class="help-label"><b>结婚证</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images">
                            <div style="">
                                <input name="client_marriage_certificate" type="hidden" value="{$vo.client_marriage_certificate|default=''}">
                                <script>$('[name="client_marriage_certificate"]').uploadMultipleImage();</script>
                            </div>
                        </div>
                    </fieldset>
                </div>

                <div class="div_divorce_certificate" style="display: none;">
                    <span class="help-label"><b>离婚证</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images">
                            <div style="">
                                <input name="client_divorce_certificate" type="hidden" value="{$vo.client_divorce_certificate|default=''}">
                                <script>$('[name="client_divorce_certificate"]').uploadMultipleImage();</script>
                            </div>
                        </div>
                    </fieldset>


                    <!--<span class="help-label"><b>离婚协议</b></span>-->
                    <!--<fieldset class="layui-form-item">-->
                    <!--    <div class="help-images">-->
                    <!--            <input name="client_divorce_agreement" type="hidden" value="">-->
                    <!--            <script>$('[name="client_divorce_agreement"]').uploadMultipleImage();</script>-->
                    <!--    </div>-->
                    <!--</fieldset>-->
                </div>

            </div>
        </fieldset>

        {eq name='$vo.base_type' value='0'}
            <fieldset class="layui-bg-gray">
                <legend><span class="layui-badge think-bg-violet">房产信息</span></legend>
                <div>
                    <span class="help-label"><b>房产证</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images">
                            <div style="">
                                <input name="client_property_ownership_certificate" type="hidden" value="{$vo.client_property_ownership_certificate|default=''}">
                                <script>$('[name="client_property_ownership_certificate"]').uploadMultipleImage();</script>
                            </div>
                        </div>
                    </fieldset>

                    <span class="help-label"><b>购房协议</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images">
                                <input name="client_house_purchase_agreement" type="hidden" value="{$vo.client_house_purchase_agreement|default=''}">
                                <script>$('[name="client_house_purchase_agreement"]').uploadMultipleImage();</script>
                        </div>
                    </fieldset>

                    <span class="help-label"><b>房产信息查询(产调)</b></span>
                    <fieldset class="layui-form-item">
                        <div class="help-images">
                                <input name="client_property_information" type="hidden" value="{$vo.client_property_information|default=''}">
                                <script>$('[name="client_property_information"]').uploadMultipleImage();</script>
                        </div>
                    </fieldset>

                </div>
            </fieldset>
            {foreach $vo.trustee_id_card as $k=>$v}
            <fieldset class="layui-bg-gray client_fieldset1">
                <legend>
                    <span class="layui-badge think-bg-violet">
                        受托人(<span class="client_index">{$k+1}</span>)
                    </span>
                    <!--<button type="button" class="layui-btn layui-btn-normal addBtn1">+</button>-->
                    <!--<button type="button" class="layui-btn layui-btn-danger delBtn1">-</button>-->
                </legend>
                <div>
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th class="nowrap text-center">身份证正面</th>
                            <th class="nowrap text-center">身份证反面</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:10px 0;">
                                    <input name="trustee_id_card_z[]" type="hidden" value="{$v.idCard_z|default=''}">
                                    <script>$('[name="trustee_id_card_z[]"]').uploadOneImage();</script>
                                </div>
                            </td>
                            <td class="padding-0 text-center">
                                <div style="margin: 0 auto;padding:5px;">
                                    <input name="trustee_id_card_f[]" type="hidden" value="{$v.idCard_f|default=''}">
                                    <script>$('[name="trustee_id_card_f[]"]').uploadOneImage();</script>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            {/foreach}
        {/eq}

        {in name='$vo.base_type' value='1,2'}
        <div class="layui-form-item">
            <span class="help-label"><b>父母身份证</b></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="nowrap text-center">父亲身份证正面</th>
                    <th class="nowrap text-center">父亲身份证反面</th>
                    <th class="nowrap text-center">母亲身份证正面</th>
                    <th class="nowrap text-center">母亲身份证反面</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-if="item.city.length > 0" ng-repeat="item in rules">
                    <td class="padding-0 text-center">
                        <div style="margin: 0 auto;padding:10px 0;">
                            <input name="front_of_fathers_id_card" type="hidden" value="{$vo.front_of_fathers_id_card|default=''}">
                            <script>$('[name="front_of_fathers_id_card"]').uploadOneImage();</script>
                        </div>
                    </td>
                    <td class="padding-0 text-center">
                        <div style="margin: 0 auto;padding:10px 0;">
                            <input name="reverse_side_of_fathers_id_card" type="hidden" value="{$vo.reverse_side_of_fathers_id_card|default=''}">
                            <script>$('[name="reverse_side_of_fathers_id_card"]').uploadOneImage();</script>
                        </div>
                    </td>
                    <td class="padding-0 text-center">
                        <div style="margin: 0 auto;padding:10px 0;">
                            <input name="front_of_mothers_id_card" type="hidden" value="{$vo.front_of_mothers_id_card|default=''}">
                            <script>$('[name="front_of_mothers_id_card"]').uploadOneImage();</script>
                        </div>
                    </td>
                    <td class="padding-0 text-center">
                        <div style="margin: 0 auto;padding:10px 0;">
                            <input name="reverse_side_of_mothers_id_card" type="hidden" value="{$vo.reverse_side_of_mothers_id_card|default=''}">
                            <script>$('[name="reverse_side_of_mothers_id_card"]').uploadOneImage();</script>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <span class="help-label"><b>父母户口本</b></span>
        <fieldset class="layui-form-item">
            <div class="help-images">
                <input name="parents_household_register" type="hidden" value="{$vo.parents_household_register|default=''}">
                <script>$('[name="parents_household_register"]').uploadMultipleImage();</script>
            </div>
        </fieldset>
        {/in}

        <span class="help-label"><b>其他</b></span>
        <fieldset class="layui-form-item">
            <div class="help-images">
                <input name="other" type="hidden" value="{$vo.other|default=''}">
                <script>$('[name="other"]').uploadMultipleImage();</script>
            </div>
        </fieldset>

        <!--<div class="layui-form-item ck-hidden">-->
        <!--    <span class="color-green font-w7 label-required-prev">审核操作类型</span>-->
        <!--    <span class="color-desc margin-left-5">Audit type</span>-->
        <!--    <div class="layui-textarea" style="min-height:auto;padding:10px 0 13px 18px">-->
        <!--        {php} $status = 1; {/php}-->
        <!--        {foreach [1 => '通过', 0 => '驳回'] as $k => $v}-->
        <!--        {if $k eq $status}-->
        <!--        <input checked name="status" title="{$v}" lay-filter="status" type="radio" value='{$k}'>-->
        <!--        {else}-->
        <!--        <input name="status" title="{$v}" lay-filter="status" type="radio" value='{$k}'>-->
        <!--        {/if}{/foreach}-->
        <!--    </div>-->
        <!--</div>-->

        {if $vo.status == 5}
        <!--<label class="layui-form-item relative block">-->
        <!--    <span class="help-label"><b>审批人</b></span>-->
        <!--    <input class="layui-input" name="approval_name" placeholder="请输入审批人名字" required value='{$vo.approval_name|default=""}'>-->
        <!--</label>-->
        {/if}

        {if $vo.status == 1}
        <div class="layui-form-item video_forensics_div">
            <span class="color-green font-w7">视频取证</span>
            <div class="layui-input-block" style='margin-left: 0;'>
                <div class="layui-form-item">
                  <input type="checkbox" name="video_forensics" lay-skin="switch" lay-text="开启|关闭" checked value="1">
                </div>
            </div>
        </div>
        {/if}
        {if $vo.status == 1 and $vo.base_type == 0}
	    <input name="proxy_type" title="委托书" lay-filter="proxy_type" type="radio" value='0' {$vo.proxy_type =='0'?'checked':''}>
	    <input name="proxy_type" title="声明书" lay-filter="proxy_type" type="radio" value='1' {$vo.proxy_type =='1'?'checked':''}>
	    <br>

	    <label class="layui-form-item relative ">
		    <span class="color-green font-w7">声明书标题</span>
            <input class="layui-input" name="proxy_title" placeholder="请输入声明书标题" value='{$vo.proxy_title|default=""}'>
        </label>
        <div class="layui-form-item proxy_statement_div" >
            <!--<span class="color-green font-w7 label-required-prev">委托/声明书</span>-->
            <span class="color-desc margin-left-5"></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="text-center label-required-prev" style="width:90px">委托/声明书</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="proxy_statement" placeholder="请输入委托/声明书">{$vo.proxy_statement|default='1'}</textarea>
                        </div>
                    </th>
                </tr>
                </thead>
            </table>
        </div>
   
        <span class="help-label"><b>委托/声明书 </b></span>
        <fieldset class="layui-form-item">
            <div class="help-images">
                {php} $pultis = ''; 
                    foreach($pdf_all_list as $kk=>$vv){
                        if(isset($vv['10']) ){
                            $pultis = $vv['10'];
                        }
                        if(isset($vv['60']) ){
                            $pultis = $vv['60'];
                        }
                    }
                {/php}
                    <input name="proxy_statement_pdf" type="hidden" value="{$pultis}">
                    <script>$('[name="proxy_statement_pdf"]').uploadMultipleWorld();</script>
            </div>
        </fieldset>

        {/if}
        {if $vo.status == 1}
        <div class="layui-form-item read_agreement_div">
            <span class="color-green font-w7 label-required-prev">阅读协议</span>
            <span class="color-desc margin-left-5"></span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="text-center" style="width:90px">公证申请表</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="read_agreement5" placeholder="请输入公证申请表">{$vo.read_agreement5|default='1'}</textarea>
                        </div>
                        <span class="help-label"><b>公证申请表 world</b></span>
                        <fieldset class="layui-form-item">
                            <div class="help-images">
                                {php} $pultis = ''; 
                                foreach($pdf_all_list as $kk=>$vv){
                                    if(isset($vv['50']) ){
                                        $pultis = $vv['50'];
                                    }
                                }
                              {/php}
                                    <input name="read_agreement5_0_pdf" type="hidden" value="{$pultis|default=''}">
                                    <script>$('[name="read_agreement5_0_pdf"]').uploadMultipleWorld();</script>
                            </div>
                        </fieldset>
                    </th>
                </tr>

                <tr>
                    <th class="text-center" style="width:90px">公证受理通知单</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="read_agreement4" placeholder="请输入公证受理通知单">{$vo.read_agreement4|default='1'}</textarea>
                        </div>
                        <span class="help-label"><b>公证受理通知单 </b></span>
                        <fieldset class="layui-form-item">
                            <div class="help-images">
                                {php} $pultis = ''; 
                                foreach($pdf_all_list as $kk=>$vv){
                                    if(isset($vv['40']) ){
                                        $pultis = $vv['40'];
                                    }
                                }
                              {/php}
                                    <input name="read_agreement4_pdf" type="hidden" value="{$pultis|default=''}">
                                    <script>$('[name="read_agreement4_pdf"]').uploadMultipleWorld();</script>
                            </div>
                        </fieldset>
                    </th>
                </tr>

                <tr>
                    <th class="text-center" style="width:90px">公证告知书</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="read_agreement3" placeholder="请输入公证告知书">{$vo.read_agreement3|default='1'}</textarea>
                        </div>
                        <span class="help-label"><b>公证告知书 </b></span>
                        <fieldset class="layui-form-item">
                            <div class="help-images">
                                {php} $pultis = ''; 
                                foreach($pdf_all_list as $kk=>$vv){
                                    if(isset($vv['30']) ){
                                        $pultis = $vv['30'];
                                    }
                                }
                              {/php}
                                    <input name="read_agreement3_pdf" type="hidden" value="{$pultis|default=''}">
                                    <script>$('[name="read_agreement3_pdf"]').uploadMultipleWorld();</script>
                            </div>
                        </fieldset>
                    </th>
                </tr>

                <tr>
                    <th class="text-center" style="width:90px">谈话笔录</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="read_agreement2" placeholder="请输入谈话笔录">{$vo.read_agreement2|default='1'}</textarea>
                        </div>
                        <span class="help-label"><b>谈话笔录 </b></span>
                        <fieldset class="layui-form-item">
                            <div class="help-images">
                                {php} $pultis = ''; 
                                foreach($pdf_all_list as $kk=>$vv){
                                    if(isset($vv['20']) ){
                                        $pultis = $vv['20'];
                                    }
                                }
                              {/php}
                                    <input name="read_agreement2_pdf" type="hidden" value="{$pultis|default=''}">
                                    <script>$('[name="read_agreement2_pdf"]').uploadMultipleWorld();</script>
                            </div>
                        </fieldset>
                    </th>
                </tr>

                <tr>
                    <th class="text-center" style="width:90px" style="display: none;">其他</th>
                </tr>
                <tr>
                    <th>
                        <div class="relative " style="display: none;">
                            <textarea class="layui-hide" name="read_agreement1" placeholder="请输入其他">{$vo.read_agreement1|default='1'}</textarea>
                        </div>
                    </th>
                </tr>







                </thead>
            </table>
        </div>
        {/if}


        <!--审批证书-->
        {if $vo.status==7}
        <div class="layui-form-item" id="operation_step">
            <span class="color-green font-w7 label-required-prev">操作步骤</span>
            <span class="color-desc margin-left-5"></span>
            <div class="layui-textarea" style="min-height:auto;padding:10px 0 13px 18px">
                {php} $status = 0; {/php}
                {foreach [0 => '信息待确认', 1 => '认证审核中'] as $k => $v}
                {if $k eq $status}
                <input checked name="step" title="{$v}" type="radio" value='{$k}'>
                {else}
                <input name="step" title="{$v}" type="radio" value='{$k}'>
                {/if}{/foreach}
            </div>
        </div>
        {/if}
        <label class="layui-form-item relative block">
            <span class="color-green font-w7">订单审核描述</span>
            <span class="color-desc margin-left-5"></span>
            <textarea class="layui-textarea" name="reason_for_rejection" placeholder="请输入订单审核描述">{$vo.reason_for_rejection|default=''}</textarea>
        </label>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
        {notempty name='vo.base_type'}<input name='base_type' type='hidden' value='{$vo.base_type}'>{/notempty}
        {notempty name='vo.order_no'}<input name='order_no' type='hidden' value='{$vo.order_no}'>{/notempty}
        <input name='type' type='hidden' value='{$type}'>
        <div class="layui-form-item text-center">
            <button class="layui-btn" type='submit'>保存</button>
            <button class="layui-btn layui-btn-danger" data-close data-confirm="确定要取消吗？" type='button'>取消</button>
        </div>
    </div>
</form>
<style>
	.layui-layer-page{
	    z-index: 222 !important;
    }
    .layui-layer-shade{
	    z-index: 222 !important;
    }
    .pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.pdf-content {
    position: relative;
    margin: 2% auto;
    width: 80%;
    height: 90%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #000;
}

iframe {
    width: 100%;
    height: 100%;
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 40px; /* 增大字体大小 */
    cursor: pointer;
    color: #000;
    line-height: 1;
    padding: 10px; /* 增加点击区域 */
    transition: transform 0.2s; /* 添加过渡效果 */
}

.close-btn:hover {
    transform: scale(1.2); /* 鼠标悬停时放大 */
    color: #ff0000; /* 鼠标悬停时变红色 */
}
</style>
<script>
    layui.form.render();
    // 不同公证事项显示不同的表单
        $(function(){
            var selectedOption = $("#matter").find("option:selected").val(); //value值
            if (selectedOption == 0) {
                $(".addBtn").show();
                $("#proof_of_relationship").hide(); //关系证明
                $("#entrusted_notarization").show(); //房产
                $("#parental_information").hide(); //父母
            } else if (selectedOption == 1) {
                $(".addBtn").hide();
                $("#proof_of_relationship").hide();
                $("#entrusted_notarization").hide();
                $("#parental_information").show(); //父母
            } else {
                $(".addBtn").hide();
                $("#proof_of_relationship").show();
                $("#entrusted_notarization").hide();
                $("#parental_information").show(); //父母
            }

        });
        function onclient_marital_status(status){
            //未婚
            if (status == 0) {
                $(".div_marriage_certificate,.div_divorce_certificate").hide();
            }
            //已婚
            else if (status == 1) {
                $(".div_marriage_certificate,.div_divorce_certificate").hide();
                $(".div_marriage_certificate").show();
            }
            //离异
            else {
                $(".div_marriage_certificate,.div_divorce_certificate").hide();
                $(".div_divorce_certificate").show();
            }
        }
        let client_marital_status_ = '{$vo.client_marital_status}'
        onclient_marital_status(client_marital_status_)

        form.on("radio(client_marital_status)", function (data) {
            onclient_marital_status(data.value)
        })



        form.on("select(matter)", function (data) {
            if (data.value == 0) {
                $(".addBtn,.delBtn").show();
                $("#proof_of_relationship").hide(); //关系证明
                $("#entrusted_notarization").show(); //房产
                $("#parental_information").hide(); //父母
                //委托书
                $(".proxy_statement_div").show(); //委托书

	            $('.type_label').hide();
            } else if (data.value == 1) {
                $(".addBtn,.delBtn").hide();
                $("#proof_of_relationship").hide();
                $("#entrusted_notarization").hide();
                $("#parental_information").show(); //父母
                //委托书
                $(".proxy_statement_div").hide(); //委托书

	            $('.type_label').show();
            } else {
                $(".addBtn,.delBtn").hide();
                $("#proof_of_relationship").show();
                $("#entrusted_notarization").hide();
                $("#parental_information").show(); //父母
                //委托书
                $(".proxy_statement_div").hide(); //委托书

	            $('.type_label').show();
            }

            // 二级联动
            let notarial_office_id = $("#notarial_office_id").val()

            let matter_id = '{$vo.matter_id}'

            postData = {'matter': data.value,'notarial_office_id':notarial_office_id};
            url = "{:url('linkage')}";
            $.post(url, postData, function (result) {
                //将信息填充到html中
                html = "";
                $(result).each(function (i) {
                    html += "<option value='" + this.id + "'>" + this.name + "</option>";
                });
                $('#matter_id').html(html);
                $('#matter_id').val(matter_id);
                form.render();
                $("#matter_id").next().find('.layui-this').trigger('click')
            }, 'json')
        });

        form.on("select(matter_id)", function (data) {
            //本人办理
            if (data.value == 1 || $("#matter").val() == 0) {
                $(".agents_msg").hide();
                $(".client_or_agents_name").text("委托人姓名")
                $(".client_or_agents_phone").text("委托人电话")
            }
            //代理人办理
            else if (data.value == 2) {
                $(".agents_msg").show();
                $(".client_or_agents_name").text("代理人姓名")
                $(".client_or_agents_phone").text("代理人电话")
            }
        });


        $("#matter").next().find('.layui-this').trigger('click')

        form.on("select(notarial_office_id)", function (data) {
            $("#matter").next().find('.layui-this').trigger('click')
        })









    layui.use(['form'], function(){
        var form = layui.form;
        form.on("radio(status)", function (data) {
            var status = data.value;
            if (this.value == '0') {
                $("#operation_step").show();
                $(".video_forensics_div,.proxy_statement_div,.read_agreement_div").hide()

            } else if (this.value == '1') {
                $("#operation_step").hide();
                $(".video_forensics_div,.proxy_statement_div,.read_agreement_div").show()

            }
        });
        layui.form.render();
        $("input[name='status']:checked").next('.layui-form-radio').trigger("click");
    });

    require(['ckeditor'], function () {
        window.createEditor('[name=proxy_statement]', {height: 350})
        window.createEditor('[name=read_agreement1]', {height: 350})
        window.createEditor('[name=read_agreement2]', {height: 350})
        window.createEditor('[name=read_agreement3]', {height: 350})
        window.createEditor('[name=read_agreement4]', {height: 350})
        window.createEditor('[name=read_agreement5]', {height: 350})
    });


</script>